"hard seed," Old English hnutu, from Proto-Germanic *khnut- (cf. Old Norse hnot, Dutch noot, Old High German hnuz, German nuß "nut"), from PIE *kneu- "nut" (cf. Latin nux; see nucleus). Sense of "testicle" is attested from 1915. Nut-brown is from c.1300 of animals; c.1500 of complexions of women.
Meaning "crazy person, crank" is attested from 1903, (British form nutter first attested 1958; nut-case is from 1959); see nuts. American English slang sense of "amount of money required for something" is first recorded 1912. The nut that goes onto a bolt is first recorded 1610s (used of other small mechanical pieces since early 15c.). Nuts and bolts "fundamentals" is from 1960.
gripe one's ass, off one's nut, tough nut, a tough nut to crack
[insanity sense probably fr late 1800s off one's nut, that is, head; senses 4, 5, and 6 fr the custom of taking the retaining nut from the wheel of a circus wagon, to be returned when all bills were paid]